/*
 * @Description: 
 * @Author: changqing
 * @Date: 2021-08-30 16:33:39
 * @LastEditTime: 2021-08-30 16:34:40
 * @LastEditors: changqing
 * @Usage: 
 */
var { timer, interval,range } = require('rxjs'); 
var {skipWhile,map} = require('rxjs/operators');

// skipWhile需要传入一个callback function，在这个function会决定忽略的目前数据流的条件，只要符合这个条件。会一直忽略，直到条件不符合为止

interval(1000).pipe(
  skipWhile(data => data < 2)
)
.subscribe(data => console.log(` ${data}`));
//2 3 4 5....